package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/2/15 11:08
 * @description
 */
public class Code985 {
    public int[] sumEvenAfterQueries(int[] A, int[][] queries) {
        int[] result = new int[A.length];
        for (int i = 0; i < A.length; i++) {
            A[queries[i][1]] = A[queries[i][1]] + queries[i][0];
            int sum = 0;
            for (int j : A) {
                if (j % 2 == 0) {
                    sum += j;
                }
            }
            result[i] = sum;
        }
        return result;
    }
}
